using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace ShareTools.InfoPathFormsLib
{
    public static class ZipManager
    {

        static string _zipFile;
        static string _unzipPath = @".\ATUnCabbed";

        public static string UnzipPath
        {
            set { _unzipPath = value; }
            get { return _unzipPath; }
        }

        public static string ZipFile
        {
            get
            {
                return _zipFile;
            }
            set
            {
                _zipFile = value;
            }
        }


        public static void ExtractItems(string zipFile)
        {
            //if (zipFile.EndsWith(".xsn") || zipFile.EndsWith(".XSN"))
            //{
            //    FileInfo file = new FileInfo(zipFile);
            //    File.Copy(zipFile, Environment.CurrentDirectory + "\\" + file.Name.Replace("xsn", "cab"));
            //}

            ZipFile = zipFile;
            CabLib.Extract i_Extract = new CabLib.Extract();
            i_Extract.ExtractFile(ZipFile, UnzipPath);

        }


    }
}
